const BESR_URL = "teatUrl";
const SV_DATA = "svdata"
export default {
	namespaced: true,
	state: {
		besrurl:uni.getStorageSync(BESR_URL) || "",
		svData:uni.getStorageSync(SV_DATA) || [],
	},
	mutations: {
		removeData(state){
			state.besrurl = ""
			state.svData = []
			this.commit('http/saveUrl')
			this.commit('http/saveSvData')
		},
		saveUrl(state){
			uni.setStorage({
				key:BESR_URL,
				data:state.besrurl
			})
		},
		saveSvData(state){
			uni.setStorage({
				key:SV_DATA,
				data:state.svData
			})
		},
		setBesrUrl(state,val){
			console.log( "besrurl"+val);
			state.besrurl = val
			this.commit('http/saveUrl')
		},
		setSvData(state,val){
			state.svData = val
			this.commit('http/saveSvData')
		}
	},
	actions: {
		
	}
}
